/*
 * @Author: Ygm
 * @Date: 2022-09-18 21:43:24
 * @LastEditors: Ygm
 * @LastEditTime: 2023-02-07 10:33:54
 * @Description: 登录相关接口
 */
import http from "@/http/request.js"

// 获取个人信息
const getPersonalInformation = (data = {}) => {
	return http.post('/user/getPersonalInformation', data, {
		isloading: true
	})
}

// 修改个人信息
const updateUserInformation = (data = {}) => {
	return http.post('/user/updateUserInformation', data, {
		isloading: true
	})
}

// 我的订单列表
const getOrderList = (data = {}) => {
	return http.post('/order/getOrderList', data, {
		isloading: true
	})
}

// 我的会员-会员类型
const comboxList = (data = {}) => {
	return http.post('/vipcard/comboxList', data, {
		isloading: true
	})
}

// 我的会员列表
const getChildUser = (data = {}) => {
	return http.post('/user/getChildUser', data, {
		isloading: true
	})
}

// 提现记录
const userWithdrawList = (data = {}) => {
	return http.post('/card/userWithdrawList', data, {
		isloading: true
	})
}

// 我的钱包
const userPackList = (data = {}) => {
	return http.post('/card/userPackList', data, {
		isloading: true
	})
}


// 我的银行卡列表
const userCardList = (data = {}) => {
	return http.post('/card/userCardList', data, {
		isloading: true
	})
}

// 添加银行卡
const saveOrUpdateUserCard = (data = {}) => {
	return http.post('/card/saveOrUpdateUserCard', data, {
		isloading: true
	})
}


// 删除银行卡
const delUserCard = (data = {}) => {
	return http.post('/card/delUserCard', data, {
		isloading: true
	})
}

// 用户发起提现
const saveUserWithdraw = (data = {}) => {
	return http.post('/card/saveUserWithdraw', data, {
		isloading: true
	})
}


// 单号查询提现详情
const getUserWithdrawByOrderNumber = (data = {}) => {
	return http.post('/card/getUserWithdrawByOrderNumber', data, {
		isloading: true
	})
}

// 单号查询提现详情
const getZxCode = (data = {}) => {
	return http.post('/vipcard/getZxCode', data, {
		isloading: true
	})
}


export default {
	getPersonalInformation,
	updateUserInformation,
	getOrderList,
	comboxList,
	getChildUser,
	userWithdrawList,
	userCardList,
	userPackList,
	saveUserWithdraw,
	delUserCard,
	saveOrUpdateUserCard,
	getUserWithdrawByOrderNumber,
	getZxCode
}
